Computer keyboards typically present two different values to the computer when a key is depressed. The first value, indicative of a key "make" is presented when a key is pressed, and the second value, indicative of a key "break", is presented when a depressed key is released. Each "make" or "break" generates a keyboard interrupt which interrupts the processor and calls a keyboard service subroutine. Once the keyboard service subroutine is invoked, it causes a data value from the keyboard data input port to be read by the processor and passed on to the program or stored at a predetermined character register location in memory. When the keyboard has been serviced, a return is made to the program and its execution resumes.
Computer keyboard macro subroutines are very useful because they can reduce keystroke sequences into one or two individual keystrokes which saves typing time and reduces the possibility of operator error. In the personal computer environment, keyboard macros can be created using special software tools known as "macro generators". These macro generators are memory resident programs which are able to send commands to application software such as the Lotus 1-2-3 (tm) spreadsheet program. A macro generator responds to a call by substituting its own routine for the standard system routine. When an application program is ready for a keyboard input, and when the user responds by typing a special keystroke, sequence, or combination defining a macro, e.g. Alt B for example, the substitute keyboard handling routines will send to the application software a sequence of keystrokes corresponding to the macro identified by Alt B.
In more specific terms, within the IBM (tm) PC/PS2 personal computer hardware environment, there are two standard keyboard handling routines called "interrupt nine (INT9)" and "interrupt sixteen (INT16)". INT9 is a hardware interrupt: the system hardware causes the INT9 keyboard interrupt handler to be executed every time that the user physically presses or releases any key on the keyboard. Upon execution of INT9, the standard keyboard handler routine reads a number (called the "scan code") of the activated key using an IN instruction to fetch the number from I/O Port 60. The scan code is then usually converted into a character code (e.g. the character "a") and is stored in a buffer or memory location called the keyboard buffer. INT16 is a software interrupt routine which is executed only when it is called by a program, such as Lotus 1-2-3 for example, when the program is ready for an input value from the keyboard. The standard INT16 handler obtains a character from the keyboard buffer and passes it along to the program requiring the character. Macro generators typically include their own keyboard interrupt handlers for INT9 and/or INT16.
Several widely used applications programs within the IBM personal computer environment, such as Microsoft Windows, Xerox Ventura Publisher, IRMA board control program for coaxial IBM 3270 emulation, and others, use their own internal keyboard hardware interrupt handlers in lieu of the standard keyboard interrupt handlers found within the system read-only memory (ROM) or within the system operating system, such as DOS. Macro generators which have been written for use with the DOS keyboard interrupt handlers often will not work with the special keyboard interrupt handlers found in these applications programs. Thus, a hitherto unsolved need has arisen for a method for making standard keyboard macro compatible with any form of special keyboard interrupt handler within any applications program.
Debuggers are diagnostic tools readily available to assembly language programmers. Debuggers typically provide at least two functions: single step execution with display of register values, and breakpoint execution wherein a program is executed to a particular point at which execution halts. The use of interrupts and the single step trace flag within the Intel 8088, 8086, 80286, 80386, etc., processor family is well understood and is clearly explained in an article by Jordan Lee Wagner, "How Debuggers Work", Byte Magazine, Vol 10, No. 11, Fall 1985, pp. 180-181. While single step techniques are known for monitoring program execution incident to debugging, they have not been heretofore applied to solving the problem of incompatibility of standard keyboard macros and special keyboard interrupt handler routines within certain applications programs.